worst-case complexity